package com.henry.db.migrate.util;

import com.citicbank.framework.utils.UnPwDecryptUtils;
import com.citicbank.framework.utils.UnPwEncryptUtils;

public class PasswordUtil {
	/**
	 * 密文密码转换为明文
	 * @param xpassword
	 * @return
	 */
	public static String decryptUnPw(String xpassword){
//		password = UnPwDecryptUtils.decryptUnPw(Constants.CBPP_SYS_ID, password).getPassword()
		return UnPwDecryptUtils.decryptUnPw("CBPP", xpassword).getPassword();
	}
	/**
	 * 对密码进行加密
	 * @param password
	 * @return
	 */
	public static String encryptUnPw(String password){
//		 UnPwEncryptUtils.encryptUnPw(Constants.CBPP_SYS_ID, "", localObject[3])
		return UnPwEncryptUtils.encryptUnPw("CBPP", "", password).split("=")[1];
	}
}
